package top.revery.api.entity.user;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author denghao
 * @title 企业用户
 * @package
 * @date 2019/12/3 17:53
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//@MappedSuperclass
@Entity
@Table(name = "company_user")
public class BaseCompanyUser implements Serializable {
    @Id
    private long id;
    //公司名
    @Column(columnDefinition="varchar(32) null comment '公司名'")
    private String companyName;
    //EMAIL邮箱
    @Column(columnDefinition="varchar(64) null comment '邮箱地址'")
    private String email;
    //
    @Column(columnDefinition="varchar(64) null comment '银行账户'")
    private String bankAccount;
    //公司手机
    @Column(columnDefinition="varchar(11) null comment '公司手机'")
        private String telephone;
    //认证审核状态
    @Column(columnDefinition="tinyint(1) UNSIGNED NOT NULL DEFAULT '0' comment '状态 0，审核中,1已审核'")
    private Integer status=0;
    //详细地址
    @Column(columnDefinition="varchar(256) null comment '详细地址'")
    private String addressDetail;

    @Column(columnDefinition = "tinyint(1) NULL comment '省份'")
    protected Integer provincesId;

    @Column(columnDefinition = "tinyint(1) NULL comment '城市'")
    protected Integer citiesId;

    //联系人姓名
    @Column(columnDefinition="varchar(32) null comment '联系人姓名'")
    private String linkmanName ;

    //营业执照
    @Column(columnDefinition = "varchar(256) null comment '营业执照'")
    private String licenseNumber;
    //公司LOGO图
    @Column(columnDefinition = "varchar(64) null comment '公司LOGO图'")
    private String logoPic;
    /*
     * 创建时间
     * 自动值添加值，不能修改
     * */
    @Column(columnDefinition="TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP comment '创建时间'",insertable = false)
    private Timestamp addTime;
}
